package router

import (
	"demo_bff/controller"
	"demo_bff/middleware"
	"github.com/gin-gonic/gin"
)

func InitRouter() *gin.Engine {
	router := gin.Default()
	router.GET("/health", controller.Health)
	router.POST("/captcha", controller.Captcha)
	router.POST("/user/register", controller.UserRegister)
	router.POST("/user/login", controller.UserLogin)
	router.Use(middleware.UserAuth())
	return router
}
